package com.xxxx.server.service.impl;

import com.xxxx.server.pojo.RespBean;
import com.xxxx.server.pojo.Visualdata;
import com.xxxx.server.mapper.VisualdataMapper;
import com.xxxx.server.service.IVisualdataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author LT
 * @since 2022-03-24
 */
@Service
public class VisualdataServiceImpl extends ServiceImpl<VisualdataMapper, Visualdata> implements IVisualdataService {

    @Autowired
    private VisualdataMapper visualdataMapper;
    /**
     * 查询用户数量
     * @param today
     * @return
     */
    @Override
    public List<Visualdata> getUsers(LocalDate today) {
        return visualdataMapper.getUsers(today);
    }

    @Override
    public List<Visualdata> getLectures(LocalDate today) {
        return visualdataMapper.getLectures(today);
    }

    @Override
    public List<Visualdata> getReverses(LocalDate today) {
        return visualdataMapper.getReverses(today);
    }

    @Override
    public Integer getTodayUsers() {
        return visualdataMapper.getTodayUsers();
    }

    @Override
    public Integer getTodayLectures() {
        return visualdataMapper.getTodayLectures();
    }

    @Override
    public Integer getTodayReverses() {
        return visualdataMapper.getTodayReverses();
    }

    @Override
    public Integer IsRepeat(LocalDate today) {
        return visualdataMapper.IsRepeat(today);
    }
    /**
     * 通过今天的日期查询编号
     * @param today
     * @return
     */
    @Override
    public Integer getVisualdataIdByTodayId(LocalDate today) {

        return visualdataMapper.getVisualdataIdByTodayId(today);
    }


}
